package com.huanxing.cloud.pay.common.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 退款订单
 *
 * @author lijx
 * @since 2022/3/18 10:07
 */
@Data
@ApiModel(description = "退款订单")
@EqualsAndHashCode(callSuper = true)
@Accessors(chain = true)
@TableName(value = "pay_refund_order")
public class PayRefundOrder extends Model<PayRefundOrder> {

	@ApiModelProperty(value = "PK")
	@TableId(type = IdType.ASSIGN_ID)
	private String id;

	@ApiModelProperty(value = "渠道号")
	private String channelMchId;

	@ApiModelProperty(value = "渠道退款单号")
	private String channelRefundNo;

	@ApiModelProperty(value = "退款状态：0.待退款；1.退款中；2.已退款；3.退款失败；4.待确认")
	private String refundStatus;

	@ApiModelProperty(value = "商户退款单号")
	private String refundTradeMo;

	@ApiModelProperty(value = "额外参数")
	private String extra;

	@ApiModelProperty(value = "渠道退款错误码")
	private String errCode;

	@ApiModelProperty(value = "渠道退款错误描述")
	private String errMsg;

	@ApiModelProperty(value = "创建时间")
	private LocalDateTime createTime;

	@ApiModelProperty(value = "更新时间")
	private LocalDateTime updateTime;

	@ApiModelProperty(value = "逻辑删除：0、显示；1、隐藏")
	private String delFlag;

	@ApiModelProperty(value = "租户id")
	private String tenantId;

	@ApiModelProperty(value = "通知地址")
	private String notifyUrl;

	@ApiModelProperty(value = "支付金额")
	private BigDecimal payAmount;

	@ApiModelProperty(value = "退款金额（元）")
	private BigDecimal refundAmount;

	@ApiModelProperty(value = "商户支付订单号")
	private String outTradeNo;

}
